package org.BUPT.infrastructure.persistent.DAO;


import org.BUPT.infrastructure.persistent.po.Answer;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository

public interface AnswerDAO extends CrudRepository<Answer, Integer> {
    Answer findAnswerByIdAndIsDel(int id,int isDel);
    List<Answer> findAllByQuestionIdAndIsDel(int id,int isDel);
    int countAnswerByQuestionIdAndIsDel(int id,int isDel);
    Answer findAnswerByQuestionIdAndUserIdAndIsDel(int questionId,int userId,int isDel);

}
